package com.ask.forMe.mq.consumer;

import com.ask.forMe.model.entity.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class TestConsumer {
    //@KafkaListener(topics = "topic1", groupId = "g1")
    public Result test(@Payload String msg) {
        log.info("生产者拉取到msg, info: {}", msg);
        return Result.success(msg);
    }
}
